<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@  taglib  uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'listResource.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link rel="stylesheet" type="text/css"
			href="./styles/control_panel.css" />
		<link rel="stylesheet" type="text/css" href="./styles/sysTable.css" />
		<script src="./javaScripts/jquery-1.5.1.min.js" type="text/javascript">
</script>
		<script type="text/javascript" src="./javaScripts/sysTable.js">
</script>

	</head>

	<body>
		<div style="margin-bottom: 4px; margin-left: 12px;">
	<pg:pager url="bbs/user/user_listUser"  maxIndexPages="10"  maxPageItems="2"   scope="request" export="currentPageNumber=pageNumber">

			<div
				style="border: 1px solid #cccccc; height: auto !important; height: 100px; min-height: 100px;">
				<div class="control_con_right_0021">
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td align="left" class="tb_left" valign="middle" colspan="3"
								style="padding-left: 10px;">
								用户列表
							</td>

						</tr>

					</table>
				</div>
				<div class="control_con_right_0022">
					<div class="control_con_right_00221">
						<table border="0" cellpadding="0" cellspacing="0" width="100%"
							align="center" style="color: #1E5B77;" class="tb_msg">
							<tr>
								<td align="center" width="15%">
									用户名称
								</td>
								<td align="center" width="5%">
									性别
								</td>
								<td align="center" width="10%">
									省
								</td>
								<td align="center" width="10%">
									市
								</td>
								<td align="center" width="5%">
									级别
								</td>
								<td align="center" width="18%">
									注册时间
								</td>
								<td align="center" width="10%">
									用户状态
								</td>
								<td align="center" width="15%">
									所属角色
								</td>
								<td align="center" width="12%">
									操作
								</td>
							</tr>
						</table>
					</div>
					<s:if test="userList!=null && userList.size>0">
						<div>

							<table border="0" cellpadding="0" cellspacing="0" width="100%"
								align="center" id="tb_msg_">
								<s:iterator value="userList" status="li" var="user1">
									<pg:item>
									<s:if  test="#session.userDto.id != 15">
										<s:if test="#user1.id == 15">
										
										</s:if>
										<s:else>
										<tr>
											<td align="center" width="15%">
												<s:property value="#user1.userName" />
											</td>
											<td align="center" width="5%">
												<s:if test="sex=='male'">男</s:if>
												<s:else>女</s:else>
											</td>
											<td align="center" width="10%">
												&nbsp;<s:property value="#user1.province" />
											</td>
											<td align="center" width="10%">
												&nbsp;<s:property value="#user1.city" />
											</td>
											<td align="center" width="5%">
												<s:property value="#user1.level" />
											</td>
											<td align="center" width="18%">
												<s:date name="#user1.registerTime"
													format="yyyy-MM-dd HH:mm:ss" />
											</td>
											<td align="center" width="10%">
												<s:if test="#user1.userStatue=='SOA'">有效</s:if>
												<s:if test="#user1.userStatue=='SOX'">
													<font color="color:red;">无效</font>
												</s:if>
											</td>
											<td align="center" width="15%">
												<s:iterator value="roleList" status="l2" var="role1">
													<s:if test="#user1.roleId==#role1.id">
														<s:property value="role" />
													</s:if>
													<s:else>&nbsp;</s:else>
												</s:iterator>
											</td>
											<td width="12%" align="center">
												<s:url var="userShow" action="user_showUser.action">
													<s:param name="userId" value="#user1.id"></s:param>
												</s:url>
												<s:url var="createUserUpdate" action="user_createUserUpdate.action">
													<s:param name="userId" value="#user1.id"></s:param>
												</s:url>
												<a href="${userShow}">查看</a> &nbsp;
												<a href="${createUserUpdate}">修改</a> &nbsp;
											</td>
										</tr>
										</s:else>
									</s:if>
									<s:else>
									<tr>
										<td align="center" width="15%">
											<s:property value="#user1.userName" />
										</td>
										<td align="center" width="5%">
											<s:if test="sex=='male'">男</s:if>
											<s:else>女</s:else>
										</td>
										<td align="center" width="10%">
											&nbsp;<s:property value="#user1.province" />
										</td>
										<td align="center" width="10%">
											&nbsp;<s:property value="#user1.city" />
										</td>
										<td align="center" width="5%">
											<s:property value="#user1.level" />
										</td>
										<td align="center" width="18%">
											<s:date name="#user1.registerTime"
												format="yyyy-MM-dd HH:mm:ss" />
										</td>
										<td align="center" width="10%">
											<s:if test="#user1.userStatue=='SOA'">有效</s:if>
											<s:if test="#user1.userStatue=='SOX'">
												<font color="color:red;">无效</font>
											</s:if>
										</td>
										<td align="center" width="15%">
											<s:iterator value="roleList" status="l2" var="role1">
												<s:if test="#user1.roleId==#role1.id">
													<s:property value="role" />
												</s:if>
												<s:else>&nbsp;</s:else>
											</s:iterator>
										</td>
										<td width="12%" align="center">
											<s:url var="userShow" action="user_showUser.action">
												<s:param name="userId" value="#user1.id"></s:param>
											</s:url>
											<s:url var="createUserUpdate" action="user_createUserUpdate.action">
												<s:param name="userId" value="#user1.id"></s:param>
											</s:url>
											<a href="${userShow}">查看</a> &nbsp;
											<a href="${createUserUpdate}">修改</a> &nbsp;
										</td>
									</tr>
									</s:else>
									
									</pg:item>
								</s:iterator>
						
							</table>


						</div>
					</s:if>
					<s:else>
						<div
							style="text-align: left; padding-left: 20px; padding-top: 4px;">
							尚未添加用户，列表为空！
						</div>
					</s:else>
				</div>
			</div>
			<!-- 分页控件 -->
           <div style="text-align: right;" id="page_con">
              			 
					    	<pg:prev>
							<a href="${pageUrl}" ><div  class="page_" id="pag_prev" >Prev</div></a> 
						  </pg:prev>
						 <pg:pages>
							 
								<s:if test="#request.currentPageNumber == #request.pageNumber}">
									<font color="red">${pageNumber}</font>
								</s:if>
								<s:else>
									<a href="${pageUrl}"><div  class="page_">${pageNumber}</div></a>
								</s:else>
							 
						</pg:pages>
						<pg:next>
							<a href="${pageUrl}"><div  class="page_" id="pag_next">Next</div></a>
						</pg:next>
 
           </div>
		 
		 
		 </pg:pager>
		</div>
	</body>
</html>
